﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true"
    CodeBehind="DirectorateDetails.aspx.cs" Inherits="AB.ServiceDirectory.Design.Directorates.DirectorateDetails" %>

<%@ Register TagPrefix="wuc" TagName="AddressLookupPopup" Src="~/WebUserControls/Lookup/AddressLookup.ascx" %>
<%@ Register TagPrefix="wuc" TagName="ContactLookupPopup" Src="~/WebUserControls/Lookup/ContactLookupUserControl.ascx" %>
<%@ Register TagPrefix="wuc" TagName="BusinessLookupPopup" Src="~/WebUserControls/Lookup/TypeOfBusinessLookup.ascx" %>
<asp:Content ID="head" ContentPlaceHolderID="head" runat="server">
    <script type="text/javascript">
        $(function () {
            $("#tabs").tabs();
        });
    </script>
    <link href="../style/AnhPopup.css" rel="stylesheet" type="text/css" />
</asp:Content>
<asp:Content ID="ContentTitle" ContentPlaceHolderID="ContentTitle" runat="server">
    <h2>Business Unit/Directorate Details</h2>
</asp:Content>
<asp:Content ID="Content" ContentPlaceHolderID="Content" runat="server">
    <div class="grid740 simplebox relative">
        <div id="tabs">
            <ul>
                <li>
                    <asp:HyperLink ID="LinkDetails01" NavigateUrl="#DetailsPanel01" runat="server">Details</asp:HyperLink></li>
                    <li>
                    <asp:HyperLink ID="LinkDetails02" NavigateUrl="#DetailsPanel02" runat="server" Visible="false">Departments</asp:HyperLink></li>
                <%--DETAIL PANEL 05--%>
                <asp:HiddenField ID="HiddenFieldDirectorateId" runat="server" />
                <asp:HiddenField ID="HiddenFieldOrganizationId" runat="server" />
            </ul>
            <span class="top-right-cornor">
                <asp:Button CssClass="st-button" ID="ButtonInactive" runat="server" Text="In-active"
                    CommandName="active" CausesValidation="False" OnCommand="ButtonInactive_Command"
                    Visible="False" />
                <asp:Button CssClass="st-button" ID="ButtonSave" runat="server" Text="Save" 
                OnCommand="ButtonSave_Command" Enabled="False" />
                <asp:Button CssClass="st-button" ID="ButtonBack" runat="server" Text="Back"
                    CausesValidation="False" onclick="ButtonBack_Click" />
            </span>
            <asp:Panel ID="DetailsPanel01" ClientIDMode="Static" runat="server">
                <div class="st-form-line-noleft">
                    <div class="half">
                        <asp:Label ID="LabelOrganizationName" runat="server" Text="Directorate Name" CssClass="st-labeltext level1 required"
                            AssociatedControlID="TextBoxDirectorateName">
                            <asp:RequiredFieldValidator ID="RequiredDirectorateName" runat="server" ErrorMessage="*" Display="None"
                                SetFocusOnError="true" ForeColor="red" ControlToValidate="TextBoxDirectorateName" />
                        </asp:Label><asp:TextBox ID="TextBoxDirectorateName" CssClass="st-forminput" runat="server"
                            Width="200px"></asp:TextBox><br /><asp:Label ID="LabelNameExists" runat="server" ForeColor="maroon" Text=""></asp:Label></div><div class="half last">
                        <asp:Label ID="LabelTypeOfBusiness" runat="server" Text="Type of Business" CssClass="st-labeltext level1 required"
                            AssociatedControlID="TextBoxTypeOfBusiness">
                            <asp:RequiredFieldValidator ID="RequiredTypeOfBusiness" runat="server" ErrorMessage="*" Display="none"
                                SetFocusOnError="true" ForeColor="red" ControlToValidate="TextBoxTypeOfBusiness" />
                        </asp:Label><asp:TextBox ID="TextBoxTypeOfBusiness" CssClass="st-forminput st-disable"
                            runat="server" Width="150px" ReadOnly="True"></asp:TextBox><asp:LinkButton OnCommand="ButtonLookup_Command"
                                CommandName="business" ID="ButtonTypeOfBusinessLookup" runat="server" CssClass="hg-blue"
                                Text="Lookup" CausesValidation="False" />
                        <br />
                        <asp:HiddenField ID="HiddenFieldBusinessId" runat="server" />
                    </div>
                    <div class="clear">
                    </div>
                </div>
                <div class="st-form-line-noleft">
                    <div class="half">
                        <asp:Label ID="LabelShortDescription" runat="server" Text="Organization Short Description"
                            CssClass="st-labeltext level1" AssociatedControlID="TextBoxShortDescription">
                            <asp:RequiredFieldValidator ID="RequiredShortDescription" runat="server" ErrorMessage="*"
                                SetFocusOnError="true" ForeColor="red" ControlToValidate="TextBoxShortDescription" />
                        </asp:Label><asp:TextBox ID="TextBoxShortDescription" CssClass="st-forminput" runat="server"
                            Width="200px" TextMode="MultiLine" Rows="3"></asp:TextBox></div><div class="half last">
                    </div>
                    <div class="half last">
                        <asp:Label ID="LabelSicCode" runat="server" Text="SIC" CssClass="st-labeltext level1"
                            AssociatedControlID="TextBoxSicCode"></asp:Label><asp:TextBox ID="TextBoxSicCode"
                                CssClass="st-forminput st-disable" runat="server" Width="50px" ReadOnly="True"></asp:TextBox></div><div class="clear">
                    </div>
                </div>
                <div class="st-form-line-noleft">
                    <div class="half">
                        <asp:Label ID="LabelLeadContact" runat="server" Text="Lead Contact" CssClass="st-labeltext level1"
                            AssociatedControlID="TextBoxLeadContact"></asp:Label><asp:TextBox ID="TextBoxLeadContact"
                                CssClass="st-forminput st-disable" runat="server" Width="150px" ReadOnly="True"></asp:TextBox><asp:LinkButton
                                    OnCommand="ButtonLookup_Command" ID="ButtonContactLookup" runat="server" CssClass="hg-blue"
                                    Text="Lookup" CommandName="contact" CausesValidation="False" /><br />
                        <asp:HiddenField ID="HiddenFieldContactId" runat="server" />
                    </div>
                    <div class="half last">
                        <asp:Label ID="LabelFullDescription" runat="server" Text="Full Description" CssClass="st-labeltext level1"
                            AssociatedControlID="TextBoxFullDescription"></asp:Label><asp:TextBox ID="TextBoxFullDescription"
                                CssClass="st-forminput" runat="server" Width="200px" TextMode="MultiLine" Rows="3"></asp:TextBox><br /></div><div class="clear">
                    </div>
                </div>
                <div class="st-form-line-noleft">
                    <div class="half">
                        <asp:CheckBox ID="CheckBoxCopy" runat="server" Text="Copy Address from Organization"
                            OnCheckedChanged="CheckBoxCopy_CheckedChanged" AutoPostBack="True" /><br />
                        <br />
                        <asp:Label ID="LabelAddressLine1" runat="server" Text="Address Line 1" CssClass="st-labeltext level1 required"
                            AssociatedControlID="TextBoxAddressLine1">
                            <asp:RequiredFieldValidator ID="RequiredAddressLine1" runat="server" ErrorMessage="*" Display="None"
                                SetFocusOnError="true" ForeColor="red" ControlToValidate="TextBoxAddressLine1" />
                        </asp:Label><asp:TextBox ID="TextBoxAddressLine1" CssClass="st-forminput" runat="server"
                            Width="200px"></asp:TextBox><br /><br /><asp:Label ID="LabelAddressLine2" runat="server" Text="Address Line 2" CssClass="st-labeltext level1"
                            AssociatedControlID="TextBoxAddressLine2"></asp:Label><asp:TextBox ID="TextBoxAddressLine2"
                                CssClass="st-forminput" runat="server" Width="200px"></asp:TextBox><br /><br /><asp:Label ID="LabelAddressLine3" runat="server" Text="Address Line 3" CssClass="st-labeltext level1"
                            AssociatedControlID="TextBoxAddressLine3"></asp:Label><asp:TextBox ID="TextBoxAddressLine3"
                                CssClass="st-forminput" runat="server" Width="200px"></asp:TextBox></div><div class="half last">
                        <asp:Label ID="LabelPhoneNumber" runat="server" Text="Phone Number" CssClass="st-labeltext level1"
                            AssociatedControlID="TextBoxPhoneNumber">
                            <asp:RegularExpressionValidator ID="RegularExpressionValidator4" 
                            runat="server" ControlToValidate="TextBoxPhoneNumber" Display="Dynamic" 
                            ErrorMessage="*" ValidationExpression="\d{7}" ForeColor="red"></asp:RegularExpressionValidator>
                        </asp:Label><asp:TextBox ID="TextBoxPhoneNumber" CssClass="st-forminput" runat="server"
                            Width="200px"></asp:TextBox><div class="clear"></div>
                            <asp:CompareValidator ID="CompareValidatorPhoneNumber" runat="server" ErrorMessage="Phone number must be digits"
                            ControlToValidate="TextBoxPhoneNumber" Display="Dynamic" ForeColor="#CC0000"
                            Operator="DataTypeCheck" SetFocusOnError="True" Type="Integer"></asp:CompareValidator><br /><asp:Label ID="LabelFax" runat="server" Text="Fax" CssClass="st-labeltext level1"
                            AssociatedControlID="TextBoxFax"><asp:RegularExpressionValidator ID="RegularExpressionValidator3" 
                            runat="server" ControlToValidate="TextBoxFax" Display="Dynamic" 
                            ErrorMessage="*" ValidationExpression="\d{7}" ForeColor="red"></asp:RegularExpressionValidator>
                        </asp:Label><asp:TextBox ID="TextBoxFax" CssClass="st-forminput" runat="server" Width="200px"></asp:TextBox><div class="clear"></div>
                        <asp:CompareValidator ID="CompareValidatorFax" runat="server" ErrorMessage="Phone number must be digits"
                            ControlToValidate="TextBoxFax" Display="Dynamic" ForeColor="#CC0000"
                            Operator="DataTypeCheck" SetFocusOnError="True" Type="Integer"></asp:CompareValidator><br /><asp:Label ID="LabelEmail" runat="server" Text="Email" CssClass="st-labeltext level1"
                            AssociatedControlID="TextBoxEmail">
                            <asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" ControlToValidate="TextBoxEmail"
                                Display="Dynamic" EnableTheming="True" ErrorMessage="*" ForeColor="Red" ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*"></asp:RegularExpressionValidator></asp:Label><asp:TextBox
                                    ID="TextBoxEmail" CssClass="st-forminput" runat="server" Width="200px"></asp:TextBox><br /><br /><asp:Label ID="LabelWebAddress" runat="server" Text="Web Address" CssClass="st-labeltext level1"
                            AssociatedControlID="TextBoxWebAddress">
                            </asp:Label><asp:TextBox
                                    ID="TextBoxWebAddress" CssClass="st-forminput" runat="server" Width="200px"></asp:TextBox><div class="clear"></div>
                                    <asp:RegularExpressionValidator ID="RegularExpressionValidator2" runat="server" ForeColor="Red"
                                ControlToValidate="TextBoxWebAddress" Display="Dynamic" ErrorMessage="Web Address format is invalid" ValidationExpression="http(s)?://([\w-]+\.)+[\w-]+(/[\w- ./?%&amp;=]*)?"></asp:RegularExpressionValidator></div><div class="clear">
                                    
                    </div>
                </div>
                <div class="st-form-line-noleft">
                    <div class="half">
                        <asp:Label ID="LabelPostcode" runat="server" Text="Postcode" CssClass="st-labeltext level1 required"
                            AssociatedControlID="TextBoxPostcode">
                            <asp:RequiredFieldValidator ID="RequiredPostcode" runat="server" ErrorMessage="*" Display="None"
                                SetFocusOnError="true" ForeColor="red" ControlToValidate="TextBoxPostcode" />
                        </asp:Label><asp:TextBox ID="TextBoxPostcode" CssClass="st-forminput st-disable" runat="server"
                            Width="150px" ReadOnly="True"></asp:TextBox><asp:LinkButton OnCommand="ButtonLookup_Command"
                                ID="ButtonPostcodeLookup" runat="server" CssClass="hg-blue" Text="Lookup" CommandName="postcode"
                                CausesValidation="False" />
                        <br />
                        <asp:HiddenField ID="HiddenFieldAddressId" runat="server" />
                    </div>
                    <div class="half last">
                        <asp:Label ID="LabelCharityNumber" runat="server" Text="Charity Number" CssClass="st-labeltext level1"
                            AssociatedControlID="TextBoxCharityNumber"></asp:Label><asp:TextBox ID="TextBoxCharityNumber"
                                CssClass="st-forminput" runat="server" Width="200px"></asp:TextBox></div><div class="clear">
                    </div>
                </div>
                <div class="st-form-line-noleft">
                    <div class="half">
                        <asp:Label ID="LabelCityTown" runat="server" Text="City/Town" CssClass="st-labeltext level1"
                            AssociatedControlID="TextBoxCityTown"></asp:Label><asp:TextBox ID="TextBoxCityTown"
                                CssClass="st-forminput" runat="server" Width="200px"></asp:TextBox></div><div class="half last">
                        <asp:Label ID="LabelCompanyNumber" runat="server" Text="Company Number" CssClass="st-labeltext level1"
                            AssociatedControlID="TextBoxCompanyNumber"></asp:Label><asp:TextBox ID="TextBoxCompanyNumber"
                                CssClass="st-forminput" runat="server" Width="200px"></asp:TextBox></div><div class="clear">
                    </div>
                </div>
                <div class="st-form-line-noleft">
                    <div class="half">
                        <asp:Label ID="LabelCounty" runat="server" Text="County" CssClass="st-labeltext level1"
                            AssociatedControlID="TextBoxCounty"></asp:Label><asp:TextBox ID="TextBoxCounty" CssClass="st-forminput"
                                runat="server" Width="200px"></asp:TextBox></div><div class="half last">
                    </div>
                    <div class="clear">
                    </div>
                </div>
                <div class="st-form-line-noleft">
                    <div class="half">
                        <asp:Label ID="LabelNationCounty" runat="server" Text="Nation County" CssClass="st-labeltext level1"
                            AssociatedControlID="DropDownListNationCounty"></asp:Label><asp:DropDownList ID="DropDownListNationCounty"
                                runat="server" CssClass="st-forminput" Width="200px" DataTextField="CountryName" DataValueField="CountryId">
                            </asp:DropDownList>
                    </div>
                    <div class="half last">
                    </div>
                    <div class="clear">
                    </div>
                </div>
            </asp:Panel>
            <asp:Panel ID="DetailsPanel02" runat="server" ClientIDMode="Static" Visible="false">
                <asp:UpdatePanel ID="UpdatePanel1" runat="server">
                    <ContentTemplate>
                    <asp:PlaceHolder ID="HolderDepartmentList" runat="server" />
                </ContentTemplate>
                </asp:UpdatePanel>
            </asp:Panel>
            <%--WEB USER CONTROL--%><%--ADDRESS - POSTCODE LOOKUP--%><wuc:AddressLookupPopup
                ID="AddressLookupPopup" TextBoxPostcodeID="TextBoxPostcode" HiddenFieldAddressID="HiddenFieldAddressId"
                TextBoxAddressLine1ID="TextBoxAddressLine1" TextBoxAddressLine2ID="TextBoxAddressLine2"
                TextBoxAddressLine3ID="TextBoxAddressLine3" runat="server" />
            <%--CONTACT LOOKUP--%>
            <wuc:ContactLookupPopup ID="ContactLookupPopup" runat="server" TextBoxResultID="TextBoxLeadContact"
                HiddenFieldResultID="HiddenFieldContactId" MaximumRows="5" />
            <%--BUSINESS LOOKUP--%>
            <wuc:BusinessLookupPopup ID="BusinessLookup" runat="server" TextBoxBusinessNameID="TextBoxTypeOfBusiness"
                TextBoxSicCodeID="TextBoxSicCode" HiddenFieldBusinessId="HiddenFieldBusinessId"
                MaximumRows="5" />
            <%--DETAIL PANEL 02--%>
        </div>
    </div>
</asp:Content>
